From 45167d5c0d3e7cc2aecccd6b15f2c3202e1b1586 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 21 Jun 2020 02:17:47 +0200 Subject: [PATCH] dropdown: emit notify for selected from the changed callback Otherwise we don't emit it when the selection itself changes it - for exaple because the model changed. --- gtk/gtkdropdown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c index a95775eab6..ef151e7203 100644 --- a/gtk/gtkdropdown.c +++ b/gtk/gtkdropdown.c @@ -216,6 +216,9 @@ selection_changed (GtkSingleSelection *selection, if (GTK_IS_STRING_FILTER (filter)) gtk_string_filter_set_search (GTK_STRING_FILTER (filter), ""); gtk_single_selection_set_selected (GTK_SINGLE_SELECTION (self->popup_selection), selected); + + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]); } static void @@ -809,9 +812,6 @@ gtk_drop_down_set_selected (GtkDropDown *self, return; gtk_single_selection_set_selected (GTK_SINGLE_SELECTION (self->selection), position); - - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]); - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]); } /** -- 2.30.2